﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace OmegaEngine
{
    public class PauseScreen : GameScreen
    {
        // Constructor take the name of the component
        public PauseScreen(String Name) : base(Name)
        {
            MouseDevice mouse = Engine.Services.GetService<MouseDevice>();
            mouse.ResetMouseAfterUpdate = false;

            this.BlocksInput = true;
            this.BlocksUpdate = true;
            Engine.Paused = true;
        }

        // Override disable
        public override void Disable()
        {
            MouseDevice mouse = Engine.Services.GetService<MouseDevice>();
            mouse.ResetMouseAfterUpdate = true;
            mouse.Position = new Vector2(
                                    Engine.GraphicsDevice.Viewport.Width / 2,
                                    Engine.GraphicsDevice.Viewport.Height / 2);

            Engine.Paused = false;

            base.Disable();
        }

        // Override ToString() to return our name
        public override string ToString()
        {
               return Name;
        }
    }
}